#ifndef NOTICEMANAGERAPI_H
#define NOTICEMANAGERAPI_H

#include <QObject>
#include <QMainWindow>
#include <QtNetwork>
#include <QDebug>
#include <QJsonArray>
#include <QJsonDocument>
#include <QJsonObject>
#include <Utils.h>
#include <config.h>
#include <QMessageBox>

#include <Entity/Notice.h>

class NoticeManagerApi : public QObject
{
    Q_OBJECT
public:
    explicit NoticeManagerApi(QObject *parent = nullptr);
    QByteArray* list(int pageNum, int pageSize,QString noticeTitle,QString operateUser,QString noticeType);
    QByteArray* editNotice(qlonglong noticeId,Notice &notice);
    QByteArray* getById(int noticeId);
    QByteArray *deleteItems(QString ids);

private:
    QString baseUrl ;
    QNetworkRequest request;
    QNetworkAccessManager *manager ;
    QByteArray *data = nullptr;
    Utils utils;
};

#endif // NOTICEMANAGERAPI_H
